home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c
- Subject: Re: Invalid Indirection???
- Date: 15 Mar 1996 08:55:57 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4ibbat$pin@hpbblb.bbn.hp.com>
- References: <4i7cck$t67@infa.central.susx.ac.uk>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:4i7cck$t67@infa.central.susx.ac.uk
-
- taux5@central.susx.ac.uk (Doan Nguyen) wrote:
- >I'm pretty new to C programming but I do know Modula-2 quite well and I
- >was wondering if there was anyone out there who could tell me what
- >the error "Invalid Indirection" means in C??
- >
- >I'm writing a program to map some Fourier data into it's r and theta
- >components. I'm converting this function from it's Fortran equivalent
- >and that's why I'm using arrays.
- >
- >
- >void Map_RTheta ( float *data )
- >{
- >
- >float tempa, tempb, tempi, tempj [NPIC-1];
- >float xmap, ymap, rmap, Tmap [NPIC-1];
- >float r, xi, yi, val, tmp;
- >float pi, theta;
- >int i, j;
- >float *tempi_p;
- >float *tempj_p;
- >boolean test;
- >
- >tempi_p = &tempi;
- >tempj_p = &tempj;
- >pi = 3.14159265359;
- >
- > for (i=0;i<=NPIC-1; i+=2) { /* Copies Fourier Data into */
- > *(data + i) = *(tempi_p + i); /* tempi and tempj array */
- > }
- >
- > for (j=1; j<=NPIC-1; j+=2) {
- > *(data + j) = *(tempj_p +(j-1));
- > }
- >
- > for (j=0;j<=NPIC-1; j+=2) {
- > theta = pi*(int)j / (NPIC-1);
- > for (i=0;i<=NPIC-1; i++) {
- > r = (int)i / sqrt(2.0);
- > xi = r*sin(theta);
- > yi = -(r)*cos(theta);
- > val = xi+NHP;
- > tmp = (tempi[i]*tempj[i])+(tempi[i+1]*tempj[i+1]));
- ^
- I've never seen this compiler message, but I think this one close bracket
- may be your error.
-
- >
- >/* This is where the compiler stops and says there's an invalid
- >indirection for the "tmp" assignment */
- >
- > }
- > }
- >}
- >......
-
- Good luck,
- Matthias
-
-